<!DOCTYPE html>
<html lang="en" class="app">

<head>
    {include file="public:head_file"/}

</head>

<body class="bg-info dker">
<section id="content" class="m-t-lg wrapper-md animated fadeInDown">
    <div class="container aside-xl">
        <a class="navbar-brand block" href="index.html"><span class="h1 font-bold">Musik</span></a>
        <section class="m-b-lg">
            <header class="wrapper text-center">
                <strong>欢迎您的加入</strong>
            </header>
            <form action="{:url('login/register')}" method="post">
                <div class="form-group">
                    <input type="text" placeholder="账号" name="uname" class="form-control rounded input-lg text-center no-border">
                </div>
                <div class="form-group">
                    <input type="text" placeholder="昵称" name="nickname" class="form-control rounded input-lg text-center no-border">
                </div>
                <div class="form-group">
                    <input type="password" placeholder="密码" name="password" class="form-control rounded input-lg text-center no-border">
                </div>
                <button type="submit" class="btn btn-lg btn-warning lt b-white b-2x btn-block btn-rounded"><i class="icon-arrow-right pull-right"></i><span class="m-r-n-lg"> 注册</span></button>
                <div class="line line-dashed"></div>
                <p class="text-muted text-center"><small>Already have an account?</small></p>
                <a href="{:url('login/index')}" class="btn btn-lg btn-info btn-block btn-rounded"> 登陆</a>
            </form>
        </section>
    </div>
</section>
<!-- footer -->
<footer id="footer">
    <div class="text-center padder">
        <p>
            <small>Musik created by Neusoft Class 6<br>&copy; 2018</small>
        </p>
    </div>
</footer>
{include file="public:footer"/}

<script type="text/javascript">
    $(document).ready(function () {
        $('form').submit(function () {
            return true;

            if($("input[name='uname']").val()==''){
                alert("用户名不能为空");
                $("input[name='uname']").focus();
                return false;
            }

            if(!($("input[name='uname']").val().length >= 6 && $("input[name='uname']").val().length <=30))
            {
                alert("用户名必须在6到30个字符之间");
                $("input[name='uname']").focus();
                return false;
            }

            if($("input[name='nickname']").val()==''){
                alert("昵称不能为空");
                $("input[name='nickname']").focus();
                return false;
            }
            if(!($("input[name='nickname']").val().length >= 6 && $("input[name='nickname']").val().length <=50))
            {
                alert("昵称必须在6到50个字符之间");
                $("input[name='nickname']").focus();
                return false;
            }

            if($("input[name='password']").val()==''){
                alert("密码不能为空");
                $("input[name='password']").focus();
                return false;
            }

            if(!($("input[name='password']").val().length >= 6 && $("input[name='password']").val().length <=20))
            {
                alert("密码必须在6到20个字符之间");
                $("input[name='password']").val('');
                $("input[name='password']").focus();
                return false;
            }

        });
    });
</script>

</body>